﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WpfApplication2.Helpers
{
    public enum ValidationType
    {
        Requerido,
        Email,
        Telefono
    }

    public class PropertyValidator
    {
        public static bool ValidateRequired(PropertyElement valObject)
        {
            if ( string.IsNullOrEmpty(valObject.Value))
            {
                return false;
            }
            return true;
        }

        public static bool ValidateRequiredString(string valObject)
        {
            if (string.IsNullOrEmpty(valObject))
            {
                return false;
            }
            return true;
        }
    }

    public class PropertyElement
    {
        public string Name { get; set; }
        public string Foreground { get; set; }
        public List<ValidationType> Validations { get; set; }
        public bool IsValid
        {
            get;
            set;
        }
        public string Value
        {
            get;
            set;
        }

        public PropertyElement()
        {
            Validations = new List<ValidationType>();
        }
    }
}